package com.analog.mserver.domain.user;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import com.analog.mserver.domain.base.BaseEntity;
import com.analog.mserver.domain.common.CommonType.State;
import com.analog.mserver.domain.common.CommonType.UserType;

@Entity
@Table(name = "sys_user")
public class UserEntity extends BaseEntity {
	private static final long serialVersionUID = 8824043072677348434L;

	@Column(name = "username", unique = true, nullable = false, length = 80)
	private String username;
	@Column(name = "password", unique = true, nullable = false, length = 80)
	private String password;
	@Column(name = "state", length = 10)
	@Enumerated(EnumType.STRING)
	private State state;
	@Column(name = "user_type", length = 20)
	@Enumerated(EnumType.STRING)
	private UserType userType;
	
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public State getState() {
		return state;
	}

	public void setState(State state) {
		this.state = state;
	}

	public UserType getUserType() {
		return userType;
	}

	public void setUserType(UserType userType) {
		this.userType = userType;
	}


}
